#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<string>
using namespace std;
void sting_test1()
{

	string s1("this is a reverse_iterator test");
	string::iterator it1 = s1.begin();
	int capacity = s1.capacity();
	int size = s1.size();
	cout << "capacity=" << capacity << " " << "size=" << size << " ";
	//cout << endl;
	s1.resize(50, 'x');

	/*while (it1 != s1.end())
	{
		cout<<*it1;
		it1++;
	}*/
	cout << endl;
	cout << "capacity=" << capacity << " " << "size=" << size << " ";
	cout << endl;
}
void sting_test2()
{
	string s1 = "hello world";
	size_t pos = s1.find('o');
	while (pos != string::npos)
	{
		s1.replace(pos,1,"p");
		pos = s1.find('o');
	}
	cout << s1 << endl;
}
void sting_test3()
{
	string s1 = "hello world";
	string s2 = "hello"; cout<<s2.size()<<endl;
	s1.insert(4, s2);
	cout<<s1<<endl;
}

int main()
{
	sting_test3();
}